package tech.xs.common.framework.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Entity基类
 */
@Getter
@Setter
@ToString
public class BaseEntity implements Serializable {

    @TableId(value = "id")
    protected Long id;

    /**
     * 创建者
     */
    @TableField(value = "CREATED_BY", fill = FieldFill.INSERT)
    protected String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "CREATED_TIME", fill = FieldFill.INSERT)
    protected LocalDateTime createdTime;

    /**
     * 更新者
     */
    @TableField(value = "UPDATED_BY", fill = FieldFill.INSERT_UPDATE)
    protected String updatedBy;

    /**
     * 更新时间
     */
    @TableField(value = "UPDATED_TIME", fill = FieldFill.INSERT_UPDATE)
    protected LocalDateTime updatedTime;

}
